IAP Azure Backend
===============

IAP Azure Backend functions as a backend server for some Nokia in-app purchase
examples such as Tourist Attractions and QuickHit. It also demonstrates how to
develop a a publisher's backend for non-DRM in-app purchase process with a
simple cloud based service utilizing Windows Azure Platform.

This example is hosted in a Nokia Developer Project:

  http://projects.developer.nokia.com/iap_azure_backend.

Implementation notes are available at:

  http://projects.developer.nokia.com/iap_azure_backend/wiki.


PREREQUISITES
-------------------------------------------------------------------------------

- C# basics
- Understanding of MVC architecture

LINKS
-------------------------------------------------------------------------------

Project page and downloadables
http://projects.developer.nokia.com/iap_azure_backend

Project wiki
http://projects.developer.nokia.com/iap_azure_backend/wiki

IMPORTANT FILES/CLASSES
-------------------------------------------------------------------------------

BaseCloudStorageController.cs: holds the handles for traditional table type
database (Table Service) and for blob container (Binary Large Object Service)

ApiController.cs: Lists purchaseable items and delivers downloadables.
HomeController.cs: Handles the administrative calls.

IAPProduct.cs: Represents a single purchaseable item.

Index.cshtml: Administrator view.

Important classes:
 * System.Web.Mvc.Model
 * System.Web.Mvc.View
 * System.Web.Mvc.Controller
 * Microsoft.WindowsAzure.StorageClient.TableServiceContext
 * Microsoft.WindowsAzure.StorageClient.CloudBlobContainer
 
KNOWN ISSUES
-------------------------------------------------------------------------------

None.


BUILD & INSTALLATION INSTRUCTIONS
-------------------------------------------------------------------------------

Preparations
~~~~~~~~~~~~

To develop and to test this example you need to download and install the Windows
Azure SDK from http://www.microsoft.com/windowsazure/sdk/ Windows Azure SDK.

It includes Windows Azure Tools for Microsoft Visual Studio, emulators and
Visual Web Developer 2010.

To be able to actually deploy application as a Windows Azure hosted service
you need to also sign up for a Windows Azure subscription.

Further instructions can be found from
https://www.windowsazure.com/en-us/develop/net/

   
Build on Microsoft Visual Web Developer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1. Run Microsoft Visual Web Developer as Administrator to be able to debug
2. Open the SLN file:
   File > Open Project, select the file iap_repo.sln
3. Press F5 to build the project and run it with Compute Emulator and Storage Emulator.
4. The home view will open inside a default browser


Deploying Windows Azure Applications from Visual Web Developer
~~~~~~~~~~~~~~~~~~~~~~~~~

Preparations:
1. Register to get a Windows Live ID and subscription:
   https://account.windowsazure.com/Subscriptions

Deploy:

1. Sign into the management portal at http://windows.azure.com
1. Follow the instructions at
   https://www.windowsazure.com/en-us/develop/net/fundamentals/deploying-applications/

CHANGE HISTORY
-------------------------------------------------------------------------------

1.0.0 First publication at developer.nokia.com
